#include "app_task.h"
#include "usmart.h"
#include "timer.h"
#include "app.h"
#include "um_uart.h"
#include "UM_USMART.h"

#include "app_data.h"

#include "pad.h"

static
PT_THREAD(usmart(PT *pt))
{
    PT_BEGIN(pt);
    for (;;)
    {
    	PT_DELAY(pt,1);

    	UM_USmart_Exec();
		PT_Nop();
    }
    PT_END(pt);
}

PT_THREAD(thread_usmart(PT *pt))
{
    static PT pt_usmart;
    PT_BEGIN(pt);
    PT_INIT(&pt_usmart);

    UM_USmart_Init(USART2);


	PT_WAIT_THREAD(pt, usmart(&pt_usmart));

    PT_YIELD(pt);
    PT_END(pt);
}
